/**
 * <p>Copyright (c) 2017 深圳市鹏途交通科技有限公司 </p>
 * <p>				   All right reserved. 		     </p>
 * 
 * <p>项目名称 ： 	         </p>
 * <p>创建者   :	heyong 
 * 
 * <p>描   述  :   MoneyDetail.java for com.pengtu.gsj.entity.jhgl    </p>
 * 
 * <p>最后修改 : $: 2017年6月29日-下午3:33:53 v 1.0.0	 win7   $ </p>
 * 
*/

package com.pengtu.gsj.entity.jhgl;

import java.util.List;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.persistence.Transient;

import com.pengtu.gsj.entity.app.Attachment;
import com.pengtu.gsj.entity.base.IdEntity;

/**
 * 
 * MoneyDetail
 * 
 * 2017年6月29日 下午3:33:53
 * 
 * @version 1.0.0
 * 
 */
@Entity
@Table(name = "T_JH_MONEYDETAIL")
public class MoneyDetail extends IdEntity {

	
	private static final long serialVersionUID = 2145867014026179718L;
	
	private String year;				//年份
	private Double cityMoney;			//市级政府专项资金
	private Double countyMoney;			//县级政府专项资金
	private String isGrow;				//养护资金是否增长  1是 0否
	private String isReserved;			//预留应急抢险专项资金  1是 0否
	private String remark;				//备注
	
	
	private Integer bulletinNumber;     //检测文件数
	private List<Attachment> attachments;
	
	@Column(name="YEAR")
	public String getYear() {
		return year;
	}
	public void setYear(String year) {
		this.year = year;
	}
	@Column(name="CITYMONEY")
	public Double getCityMoney() {
		return cityMoney;
	}
	public void setCityMoney(Double cityMoney) {
		this.cityMoney = cityMoney;
	}
	@Column(name="COUNTYMONEY")
	public Double getCountyMoney() {
		return countyMoney;
	}
	public void setCountyMoney(Double countyMoney) {
		this.countyMoney = countyMoney;
	}
	@Column(name="ISGROW")
	public String getIsGrow() {
		return isGrow;
	}
	public void setIsGrow(String isGrow) {
		this.isGrow = isGrow;
	}
	@Column(name="ISRESERVED")
	public String getIsReserved() {
		return isReserved;
	}
	public void setIsReserved(String isReserved) {
		this.isReserved = isReserved;
	}
	@Column(name="REMARK")
	public String getRemark() {
		return remark;
	}
	public void setRemark(String remark) {
		this.remark = remark;
	}
	
	@Transient
	public Integer getBulletinNumber() {
		bulletinNumber = attachments.size();
		return bulletinNumber;
	}

	public void setBulletinNumber(Integer bulletinNumber) {
		this.bulletinNumber = bulletinNumber;
	}

	@OneToMany(fetch = FetchType.EAGER)
	@JoinColumn(name = "PARTID")
	public List<Attachment> getAttachments() {
		return attachments;
	}

	public void setAttachments(List<Attachment> attachments) {
		this.attachments = attachments;
	}

}
